<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>09_溢出处理</title>
    <style>
        .overflow {
            width: 300px;
            height: 500px;
            background-color: yellow;
            overflow: visible; /* 溢出可见，默认值*/
            overflow: hidden; /* 溢出隐藏， 超出去的部分直接裁掉*/
            overflow: scroll; /* 无论是否溢出，两个方向都显示拖拽条*/
            overflow: auto;/* 溢出的方向自动显示拖拽条*/
        }
        .text {
            width: 200px;
            height: 100px;
            /* 以下三句为组合代码，缺一不可*/
            white-space: nowrap; /* 强制文本不换行*/
            overflow: hidden; /* 溢出隐藏*/
            text-overflow: ellipsis;/* 溢出的文字替换成省略号*/
        }
    </style>
</head>
<body>
    <div class="overflow">
        <img src="img/computer1.png">
    </div>
    <div class="text" title="Lorem ipsum dolor sit amet, consectetur adipisicing elit. A alias autem, consectetur debitis delectus
      distinctio dolor dolorum ducimus eum fuga illum magnam minima molestiae necessitatibus omnis pariatur quae rem
      temporibus.">
        Lorem ipsum dolor sit amet, consectetur adipisicing elit. A alias autem, consectetur debitis delectus
        distinctio dolor dolorum ducimus eum fuga illum magnam minima molestiae necessitatibus omnis pariatur quae rem
        temporibus.
    </div>
</body>
</html>